From 14e943162932652c818850dcb184b3de77ade143 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 4 Feb 2009 11:57:17 +0000 Subject: [PATCH] XendAPIStore - do not remove non-existent item If list is searched and item not found, then don't attempt to delete the item. Signed-off-by: Jim Fehlig --- tools/python/xen/xend/XendAPIStore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendAPIStore.py b/tools/python/xen/xend/XendAPIStore.py index 372509d695..dc313717dd 100644 --- a/tools/python/xen/xend/XendAPIStore.py +++ b/tools/python/xen/xend/XendAPIStore.py @@ -33,7 +33,8 @@ def register(uuid, type, inst): def deregister(uuid, type): old = get(uuid, type) - del __classes[(uuid, type)] + if old is not None: + del __classes[(uuid, type)] return old def get(uuid, type): -- 2.30.2